#include <iostream>
#include <cstring>
using namespace std;

int main()
{
    cout<<"short: "<<sizeof(short)<<"bit"<<endl;
    short SHORT_MAX=0;
    memset(&SHORT_MAX, 0xff, sizeof SHORT_MAX);
    SHORT_MAX^=1<<15;
    cout << SHORT_MAX << endl; //32767
    short si = -32767;
    int ii=si; //-32767
    unsigned int ui = si; //4294934529
    cout << "si:" << si << "\n";
    cout << "ii:" << ii << "\n";
    cout << "ui:" << ui << "\n";
    return 0;
}